{App::registerCoreScript('jquery')}
{App::registerCoreScript('base')}
{App::registerScript('inc/Modules/Users/js/edit_users_properties.js')}

<table class="list">
	<tr>
		<th class="_20">Ред.</th>
		<th class="_20">Обяз.</th>
		<th class="_20">Тип</th>
		<th>Название</th>
		<th>Имя</th>
		<th>Значение по умолчанию</th>
		<th class="_20">Удл.</th>
	</tr>
	{foreach $properties as $property}
		<tr rel="{$property->id}" class="save">
			<td class="center">
				<a href="#" class="edit" rel="{$property->id}"><img src="{$tpl_url}images/pencil.png"/></a>
			</td>
			<td class="center">
				{if $property->required}
					<img src="{$tpl_url}images/exclamation-red.png" alt="" />
				{/if}
			</td>
			<td class="center" style="min-width: 50px;">
				<img src="{App::config()->data('relative_url')}inc/Modules/Users/images/type_{$property->type}.png"/>
			</td>
			<td>
				{$property->title}
			</td>
			<td>
				{$property->name}
			</td>
			<td>
				{$property->default_value}
			</td>
			<td class="center">
				<a class="delete" href="{$base_url}&action=prop_delete&id={$property->id}"><img src="{$tpl_url}images/trash.png"/></a>
			</td>
		</tr>
		<tr class="edit" rel="{$property->id}" style="display: none;">{include file="properties_form.html" property=$property}</tr>
	{/foreach}
	<tr>
		{include file="properties_form.html" property=$_property}
	</tr>
</table>
